$(function () {
   DEFAULT_COOKIE_EXPIRE_TIME = 30;
   uname = "";
   session = "";
   currentVideo = null;
   listedVideos = null;
   session = getCookie("session");
   uname = getCookie("username");

   initPage(function () {
      if (listedVideos != null){
          currentVideo = listAllVideos[0];
          selectVideo(listedVideos[0]['id'])
      }
      $(".video-item").click(function () {

      });
      $(".del-video-button").click(function () {

      });
      $(".submit-comment").on('click',function () {

      });

   });






   //home page event registry
    $("#zhuce").on('click',function (e) {
        alert(0)
    });

    $("#denglu").on('click',function (e) {
        alert(11)
    });


    // userhome page event registry
    $("#uploadform").on('click',function () {

    });
    $(".close").on('click',function () {

    });
    $("#logout").on('click',function () {
            alert(66)
    });



});

function initPage(callback) {

}

function setCookie(cname,cvalue,exmin) {
    
}
function getCookie(cname) {
    
}


function selectVideo(vid) {

}

function refreshComments() {

}

function popupNotificationMsg() {

}


function popupErrorMsg() {

}

function htmlCommentListElement(cid,author,content) {

}

function htmlVideoListElement(vid,name,ctime) {

}

// async ajax methods
function registerUser(callback) {

}

function signinUser(callback) {

}

function getUserId(callback) {

}

function createVideo(vname,callback) {

}

function listAllVideo(callback) {

}

function deleteVideo(vid,callback) {

}

function postComment(vid,content,callback) {

}

function listAllComments(vid,callback) {

}